import 'package:fluro/fluro.dart';
import 'package:flutter_audit_app/routes/i_router.dart';
import 'package:flutter_audit_app/routes/router_path.dart';
import 'package:flutter_audit_app/ui/home/views/audit_manage_page.dart';
import 'package:flutter_audit_app/ui/home/views/care_medical_institution_query_page.dart';
import 'package:flutter_audit_app/ui/home/views/fixed_pharmacy_info_query_page.dart';
import 'package:flutter_audit_app/ui/home/views/map_query_page.dart';
import 'package:flutter_audit_app/ui/home/views/medical_organ_info_query_page.dart';
import 'package:flutter_audit_app/ui/home/views/person_info_query_detail_page.dart';
import 'package:flutter_audit_app/ui/home/views/person_info_query_page.dart';
import 'package:flutter_audit_app/ui/home/views/stock_system_page.dart';
import 'package:flutter_audit_app/ui/home/views/three_database_page.dart';

class HomeRouter implements IRouterProvider {
  @override
  void initRouter(FluroRouter router) {
    ///个人信息查询
    router.define(
      RouterPath.personInfoRoute,
      handler: Handler(handlerFunc: (_, params) => PersonInfoQueryPage()),
    );

    router.define(
      RouterPath.personInfoQueryDetailRoute,
      handler: Handler(handlerFunc: (context, params) {
        return PersonInfoQueryDetailPage();
      }),
    );

    ///医疗机构信息查询
    router.define(
      RouterPath.medicalInstitutionRoute,
      handler:
          Handler(handlerFunc: (_, params) => MedicalInstitutionQueryPage()),
    );

    ///定点零售药店信息查询
    router.define(
      RouterPath.fixedPharmacyRoute,
      handler: Handler(handlerFunc: (_, params) => FixedPharmacyQueryPage()),
    );

    ///进销存系统
    router.define(
      RouterPath.stockSystemRoute,
      handler: Handler(handlerFunc: (_, params) => StockSystemPage()),
    );

    ///三止数据库查询
    router.define(
      RouterPath.threeDatabaseRoute,
      handler: Handler(handlerFunc: (_, params) => ThreeDatabaseQueryPage()),
    );

    ///照护医疗机构查询
    router.define(
      RouterPath.careMedicalInstitutionRoute,
      handler: Handler(handlerFunc: (_, params) => CareMedicalQueryPage()),
    );

    ///地图查询
    router.define(
      RouterPath.mapRoute,
      handler: Handler(handlerFunc: (_, params) => MapQueryPage()),
    );

    ///移动稽核管理
    router.define(
      RouterPath.auditRoute,
      handler: Handler(handlerFunc: (_, params) => AuditManagePage()),
    );
  }
}
